package string;

public class StartsWithDemo {
    public static void main(String[] args){
        String str="www.baidu.com";
        boolean strStart=str.startsWith("www");
        boolean strEnd=str.endsWith("com");
        System.out.println(strStart);
        System.out.println(strEnd);
    }
}
